import request from '@/router/axios'
import {getSCOrLCOrACC, qianxiangType} from "../../../commonCheck";

/**
 * 结账单据与SC层级差异待协查
 * @param query
 */
export function getSwAuTvmCashboxAmountHierarchyDifferenceList(query) {
  return request({
    url: '/check/check/getSwAuTvmCashboxAmountHierarchyDifferenceList',
    method: 'post',
    params: query
  })
}

/**
 * replace票款差异-分钱箱审核主表
 * @param query
 */
export function replaceSwAuTvmBoxAmountDifference(query) {
  return request({
    url: '/check/check/replaceSwAuTvmBoxAmountDifference',
    method: 'post',
    params: query
  })
}

/**
 * 分钱箱下发
 * @param query
 */
export function sendStatusSwAuTvmCashboxAmountHierarchyDifference(query) {
  return request({
    url: '/check/check/sendStatusSwAuTvmCashboxAmountHierarchyDifference',
    method: 'post',
    data: query
    //params: query
  })
}

export function getMondifyData1(ob){
  console.log(ob)
  let one={};
  let two={};
  one.type="结账单据";
  one.saleAmount=ob.billOrderMoney;
  one.saleAmountCY='';

  two.type='SC';
  two.saleAmount=ob.saleAmount;
  two.saleAmountCY=ob.saleAmount-ob.billOrderMoney;

  let res=[];
  res.push(one);
  res.push(two);
  return res;
}

export const cols1=[{
  label: '系统层级',
  prop: "type",
  formslot: true,
},
  {
    label: '清点金额',
    prop: "saleAmount",
    formslot: true,
  },
  {
    label: '差异金额',
    prop: "saleAmountCY",
    formslot: true,
  }]


export function getMondifyData2(ob){
  let res=[];
  let one={};
  let two={};
  one.type="结账单据";
  one.saleAmount=ob.billOrderMoney;
  one.replySystemAmount='';
  one.saleAmountCY='';

  two.type='SC';
  two.saleAmount=ob.saleAmount;
  two.replySystemAmount=ob.replySystemAmount;
  two.saleAmountCY=ob.replySystemAmount-ob.billOrderMoney;

  res.push(one);
  res.push(two);
  return res;
}

export const cols2=[{
  label: '系统层级',
  prop: "type",
  formslot: true,
},
  {
    label: '协查系统清点金额',
    prop: "saleAmount",
    formslot: true,
  },
  {
    label: '回馈系统清点金额',
    prop: "replySystemAmount",
    formslot: true,
  },
  {
    label: '回馈后清点金额差异',
    prop: "saleAmountCY",
    formslot: true,
  }
  ]
